# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=nfdump
pkgver=1.6.23
pkgrel=1
groups=('blackarch' 'blackarch-networking')
pkgdesc='A set of tools to collect and process netflow data.'
arch=('x86_64' 'aarch64')
url='https://github.com/phaag/nfdump'
license=('BSD')
depends=('libpcap')
makedepends=('flex' 'bison' 'autoconf' 'automake')
source=("https://github.com/phaag/nfdump/archive/refs/tags/v$pkgver.tar.gz")
sha512sums=('e3f79af69a170985fcbd1757fab86e90840d040cf7a6214c7f9851ed59695d3844a15269904c3ba989b6b6ed2ddf29fd19a493165d3037e49aa2bb69b831f168')

prepare() {
  cd "$pkgname-$pkgver"

  ./autogen.sh
}

build() {
  cd "$pkgname-$pkgver"

  ./configure --prefix=/usr --sbindir=/usr/bin

  make
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" README INSTALL NEWS \
    AUTHORS ChangeLog
}

